<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
	</head>
	<body>
		<script>
			
			// var array = new Array(7);//代表构造长度为7的数组
			// console.log(array.length);
			// //在js数组里面可以放任意类型的数据
			// var array1 = new Array(100,'a',true);
			// console.log(array1.length);
			// console.log(array1);
			// console.log(array);
			
			var array = new Array();
			array[0] = 1;
			console.log(array);
			console.log(array.length);
			array[1] = true;
			console.log(array);
			console.log(array.length);
			
			//使用一个push和pop分别对应栈操作的入栈和出栈
			var array1 = new Array();
			 array1.push("张三");
			 console.log(array1);
			array1.push(34);//是在数组的最后添加数据
			console.log(array1);
			array1.push(false);
			console.log(array1);
			
			console.log(array1[1]);
			console.log(array1.pop());//pop是吧最后一个数取出
			console.log(array1);
			
			//math应用
			console.log( Math.round(3.14));
			console.log(Math.floor(3.14));
			console.log(Math.ceil(3.14));
			
			console.log();
			eval("var x=10;var y=20;console.log(x*y);"); 
			
		</script>
		
	</body>
</html>
